package com.teamwings.modules.file.factory;

import com.teamwings.modules.file.fallback.FileFallback;
import com.teamwings.modules.file.feign.FileServiceFeign;
import feign.hystrix.FallbackFactory;

public class FileFallbackFactory implements FallbackFactory<FileServiceFeign> {

    public FileFallbackFactory() {
    }

    @Override
    public FileServiceFeign create(Throwable throwable) {
        FileFallback fileFallback = new FileFallback();
        fileFallback.setCause(throwable);
        return fileFallback;
    }
}
